3.1533 \(\int \frac{c+d x}{(a-b x) (a+b x)} \, dx\)

Optimal. Leaf size=49 \[ \frac{(b c-a d) \log (a+b x)}{2 a b^2}-\frac{(a d+b c) \log (a-b x)}{2 a b^2} \]

[Out]

-((b*c + a*d)*Log[a - b*x])/(2*a*b^2) + ((b*c - a*d)*Log[a + b*x])/(2*a*b^2)

________________________________________________________________________________________

Rubi [A]  time = 0.0367234, antiderivative size = 49, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.048, Rules used = {72} \[ \frac{(b c-a d) \log (a+b x)}{2 a b^2}-\frac{(a d+b c) \log (a-b x)}{2 a b^2} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x)/((a - b*x)*(a + b*x)),x]

[Out]

-((b*c + a*d)*Log[a - b*x])/(2*a*b^2) + ((b*c - a*d)*Log[a + b*x])/(2*a*b^2)

Rule 72

Int[((e_.) + (f_.)*(x_))^(p_.)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Int[ExpandIntegrand[(
e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[p]

Rubi steps

\begin{align*} \int \frac{c+d x}{(a-b x) (a+b x)} \, dx &=\int \left (\frac{-b c-a d}{2 a b (-a+b x)}+\frac{b c-a d}{2 a b (a+b x)}\right ) \, dx\\ &=-\frac{(b c+a d) \log (a-b x)}{2 a b^2}+\frac{(b c-a d) \log (a+b x)}{2 a b^2}\\ \end{align*}

Mathematica [A]  time = 0.0079147, size = 37, normalized size = 0.76 \[ \frac{c \tanh ^{-1}\left (\frac{b x}{a}\right )}{a b}-\frac{d \log \left (a^2-b^2 x^2\right )}{2 b^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)/((a - b*x)*(a + b*x)),x]

[Out]

(c*ArcTanh[(b*x)/a])/(a*b) - (d*Log[a^2 - b^2*x^2])/(2*b^2)

________________________________________________________________________________________

Maple [A]  time = 0.004, size = 60, normalized size = 1.2 \begin{align*} -{\frac{\ln \left ( bx+a \right ) d}{2\,{b}^{2}}}+{\frac{\ln \left ( bx+a \right ) c}{2\,ab}}-{\frac{\ln \left ( bx-a \right ) d}{2\,{b}^{2}}}-{\frac{\ln \left ( bx-a \right ) c}{2\,ab}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)/(-b*x+a)/(b*x+a),x)

[Out]

-1/2/b^2*ln(b*x+a)*d+1/2/a/b*ln(b*x+a)*c-1/2/b^2*ln(b*x-a)*d-1/2/a/b*ln(b*x-a)*c

________________________________________________________________________________________

Maxima [A]  time = 1.1113, size = 62, normalized size = 1.27 \begin{align*} \frac{{\left (b c - a d\right )} \log \left (b x + a\right )}{2 \, a b^{2}} - \frac{{\left (b c + a d\right )} \log \left (b x - a\right )}{2 \, a b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(-b*x+a)/(b*x+a),x, algorithm="maxima")

[Out]

1/2*(b*c - a*d)*log(b*x + a)/(a*b^2) - 1/2*(b*c + a*d)*log(b*x - a)/(a*b^2)

________________________________________________________________________________________

Fricas [A]  time = 1.29493, size = 90, normalized size = 1.84 \begin{align*} \frac{{\left (b c - a d\right )} \log \left (b x + a\right ) -{\left (b c + a d\right )} \log \left (b x - a\right )}{2 \, a b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(-b*x+a)/(b*x+a),x, algorithm="fricas")

[Out]

1/2*((b*c - a*d)*log(b*x + a) - (b*c + a*d)*log(b*x - a))/(a*b^2)

________________________________________________________________________________________

Sympy [A]  time = 0.29533, size = 71, normalized size = 1.45 \begin{align*} - \frac{\left (a d - b c\right ) \log{\left (x + \frac{a^{2} d - a \left (a d - b c\right )}{b^{2} c} \right )}}{2 a b^{2}} - \frac{\left (a d + b c\right ) \log{\left (x + \frac{a^{2} d - a \left (a d + b c\right )}{b^{2} c} \right )}}{2 a b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(-b*x+a)/(b*x+a),x)

[Out]

-(a*d - b*c)*log(x + (a**2*d - a*(a*d - b*c))/(b**2*c))/(2*a*b**2) - (a*d + b*c)*log(x + (a**2*d - a*(a*d + b*
c))/(b**2*c))/(2*a*b**2)

________________________________________________________________________________________

Giac [A]  time = 2.61764, size = 65, normalized size = 1.33 \begin{align*} \frac{{\left (b c - a d\right )} \log \left ({\left | b x + a \right |}\right )}{2 \, a b^{2}} - \frac{{\left (b c + a d\right )} \log \left ({\left | b x - a \right |}\right )}{2 \, a b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(-b*x+a)/(b*x+a),x, algorithm="giac")

[Out]

1/2*(b*c - a*d)*log(abs(b*x + a))/(a*b^2) - 1/2*(b*c + a*d)*log(abs(b*x - a))/(a*b^2)